package com.itlong.cloud.paymenthub;

import com.itlong.cloud.POJO.DTO.operate.OperateBalanceAccountByPageDTO;
import com.itlong.cloud.POJO.DTO.operate.WithdrawCashAndRechargeDTO;
import com.itlong.cloud.POJO.PO.AmountChangeInfoPO;
import com.itlong.cloud.POJO.VO.operate.OperateBalanceAmountGetPageVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

/**
 * <desc>
 * 运营-财务平账服务暴露接口.
 * </desc>
 *
 * @createDate 2018/9/20
 */
@FeignClient(name = "payment-hub-service")
public interface IBalanceAccountServiceClient {


    /**
     * <desc>
     * 分页查询平账列表
     * <desc/>
     *
     * @param balanceAccountByPageDTO
     * @return
     * @author Juguang.S
     * @createDate 2018-09-20
     */
    @PostMapping(path = "/balanceAccount/getInfoByPage")
    Page<OperateBalanceAmountGetPageVO> getInfoByPage(@RequestBody OperateBalanceAccountByPageDTO balanceAccountByPageDTO) throws Exception;

    /**
     * <desc>
     * 导出EXCEL文件
     * <desc/>
     *
     * @param balanceAccountByPageDTO
     * @return
     * @author Juguang.S
     * @createDate 2018-09-20
     */
    @PostMapping(path = "/balanceAccount/exportThirdPartyPayInfo")
    List<OperateBalanceAmountGetPageVO> exportFile(@RequestBody OperateBalanceAccountByPageDTO balanceAccountByPageDTO) throws Exception;

    /**
     * <desc>
     * 根据ID获取备注信息
     * <desc/>
     *
     * @param changeId 查询ID
     * @return
     * @author Juguang.S
     * @createDate 2018-09-20
     */
    @PostMapping(path = "/balanceAccount/getRemark")
    String getRemark(@RequestParam("changeId") String changeId) throws Exception;

    /**
     * <desc>
     * 修改备注信息
     * <desc/>
     *
     * @param changeId 查询ID
     * @return
     * @author Juguang.S
     * @createDate 2018-09-20
     */
    @PostMapping(path = "/balanceAccount/updateRemark")
    void updateRemark(@RequestParam("changeId") String changeId,
                      @RequestParam("myUserName") String myUserName,
                      @RequestParam("remark") String remark) throws Exception;

    /**
     * <desc>
     * 财务平账-保存微信提现和备付金充值记录
     * <desc/>
     *
     * @param withdrawCashAndRechargeDTO 添加信息
     * @return
     * @author Juguang.S
     * @createDate 2018-09-20
     */
    @PostMapping(path = "/balanceAccount/withdrawCashAndRecharge")
    Integer save(@RequestBody WithdrawCashAndRechargeDTO withdrawCashAndRechargeDTO) throws Exception;

    /**
     * <desc>
     * 查询公司微信商户号的余额
     * <desc/>
     *
     * @return
     * @author Juguang.S
     * @createDate 2018-09-25
     */
    @PostMapping(path = "/balanceAccount/getWechatMchiAccount")
    BigDecimal getWechatMchiAccount();

}
